<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文字移除替换为省略号</title>
    <style>
        div {
            background-color: #ff0;
            /*必须限制所在区域的大小!!!以下3句为组合代码,缺一不可*/
            width: 300px;
            /*强制文本溢出*/
            white-space: nowrap;
            /*溢出的文字隐藏*/
            overflow: hidden;
            /*溢出的部分替换为省略号*/
            text-overflow: ellipsis;
        }
    </style>
</head>
<body>
<div>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deleniti fugiat in minima provident quidem unde,
    voluptate voluptates? Asperiores autem, doloribus ex facere inventore ipsa omnis placeat provident, repellendus sint
    voluptas!
</div>
</body>
</html>